<?php

namespace App\Controller\Users;

use App\Controller\Admin\BaseController;
use App\Service\Users\UsersService;
use Hyperf\Di\Annotation\Inject;
use Yj\Apidog\Annotation\ApiController;
use Yj\Apidog\Annotation\FormData;
use Yj\Apidog\Annotation\PostApi;

/**
 * @ApiController(prefix="admin/users/users")
 */
class UsersController extends BaseController
{
    /**
     * @Inject()
     * @var UsersService
     */
    protected $usersService;

    /**
     * @PostApi(path="lists",description="")
     * @FormData(key="phone",rule="nullable")
     * @FormData(key="nickname",rule="nullable")
     * @FormData(key="user_type",rule="nullable")
     * @FormData(key="level",rule="nullable")
     */
    public function lists(){
        $params = $this->getParams(false);
        $data = $this->usersService->lists($params);
        _SUCCESS($data);
    }


}